<?php
include("include/conn.php");
require('include/Smarty/libs/Smarty.class.php');

$bill = array();

$billMst = "SELECT billMstId, partyName, billNo,billDate, grossTotal
              FROM billmst
             ORDER BY billDate";
$billMstRes = mysql_query($billMst);
$a = 0;
while($billRow = mysql_fetch_assoc($billMstRes))
{
	$bill[$a]['id']         = $billRow['billMstId'];
	$bill[$a]['partyName']  = $billRow['partyName'];
	$bill[$a]['billNo']     = $billRow['billNo'];
	$bill[$a]['billDate']   = $billRow['billDate'];
	$bill[$a]['grossTotal'] = $billRow['grossTotal'];
	$a++;
}
$smarty = new Smarty;
require("bottom.php");

$smarty->assign("bill",$bill);
$smarty->display("billOriginalList.tpl");
?>